package com.huawei.bigdate.hbaseEs.service;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HBaseEsService {
    private final static Log LOG = LogFactory.getLog(HBaseEsService.class.getName());
    @Autowired
    private ESSearch esSearch;
    @Autowired
    private HBaseSearch hbaseSearch;

    public List<String> search(String pagecodeflag, String cashclasscode,String version,String tableName) {
        //先到ES集群查询出索引信息
        List<String> list = esSearch.getEsIndexList(pagecodeflag, cashclasscode,version,tableName);
        //然后根据索引到HBase查询交易信息
        return  hbaseSearch.getHbaseData(list, tableName);
    }
}
